package br.com.character.flex.chorm.core.sql
{
    [Bindable]
    public class Value implements IValue
    {
        private var _value:Object;
        public function Value(v:Object)
        {
            _value = v;
        }
        
        public function get value():Object
        {
            return _value;
        }
        
        public function set value(param:Object):void
        {
            _value = param;
        }
        
        public function toSQL():String {
            var result:String = null;
            if(value is Number){
               result = value.toString(); 
            } else{
               result = "'" + value.toString() + "'"; 
            }
            return result;
        }
    }
}